package com.assessment.repository.impl;

import com.assessment.mapper.AssessmentPeriodMapper;
import com.assessment.model.entity.AssessmentPeriod;
import com.assessment.repository.AssessmentPeriodRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 评测周期仓储实现类
 */
@Repository
public class AssessmentPeriodRepositoryImpl implements AssessmentPeriodRepository {

    @Autowired
    private AssessmentPeriodMapper periodMapper;

    @Override
    public AssessmentPeriod getCurrentPeriod() {
        return periodMapper.findCurrentPeriod();
    }

    @Override
    public AssessmentPeriod getById(Integer periodId) {
        return periodMapper.selectById(periodId);
    }
}
